home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / prgtools / njsdk30.zip / NJSDK.H < prev    next >
Text File  |  1994-03-20  |  5KB  |  113 lines

  1. /*   NJSDK.H - Header file for NJSDK - Chinese software development kits
  2.  *
  3.  *   Copyright (c) Hongbo Ni 1991-1993. All Rights Reserved.
  4.  *
  5.  *   Last modified: HBNI 18:29:47 Thu  03-18-1993
  6.  */
  7. /***************************************************************************
  8.      NJSDK - NJSTAR Chinese Software Development Kits. Version 2.1:
  9.      a C Library as  being  used  by  NJSTAR  V2.1.  It  contains  all  the
  10.      functions for handling  Chinese  Input,  display  and  printing.  With
  11.      NJSDK, user can develop any Chinese applications without  knowing  how
  12.      Chinese characters are inputed, displayed or  printed.  LICENSED  USER
  13.      can distribute all NJSTAR dictionaries and fonts (30 files) with their
  14.      applicationa without any further royalty payment. Please  contact  the
  15.      author  for current price.
  16. ***************************************************************************/
  17.  
  18. /*=========== VIDEO MODE ==============*/
  19. #define EGA   3   /* 640x350  80x19x16 */
  20. #define MEGA  4   /* 640x350  80x19x2  */
  21. #define MCGA  5   /* 640x480  80x25x2  */
  22. #define VGA   6   /* 640x480  80x25x16 */
  23. #define SVGA  7   /* 800x600 100x31x16 */
  24. /*=========== VIDEO MODE ==============*/
  25.  
  26. struct NJVIDEO {
  27.     int Videomode;    /* Current Video Mode (see above)      */
  28.     int Nrows;        /* number of rows EGA=18 VGA=24 SVGA=29*/
  29.     int BytesPerLine; /* bytes per line EGA/VGA=80 SVGA=100  */
  30.     int PixelsPerRow; /* Pixels per row EGA=18 VGA/SVGA=19   */
  31.     int Mono;         /* Is a monochrome mornitor            */
  32. };
  33.  
  34. struct MENU_S {
  35.     char row;        /* display row */
  36.     char col;        /* display col */
  37.     char len;        /* display background len */
  38.     char list;       /* the selection key in upper case */
  39.     char *str;       /* menu string */
  40.     char *msg;       /* message assorciated */
  41. } ;
  42.  
  43. /* The Entry Field type can be
  44.  * 1 - string             : stored in str[80]
  45.  * 2 - integer            : stored in str[80]
  46.  * 3 - float(signed)      : stored in str[80]
  47.  * 4 - Date (DD/MM/YY)    : stored in str[80] len == 8
  48.  * 5 - Time (HH:MM:SS)    : stored in str[80] len == 8
  49.  * 6 - limited chars      : len=1
  50.  */
  51. struct ENTRY_S {
  52.     char row;        /* display row */
  53.     char col;        /* display row */
  54.     char len;        /* len of the  field */
  55.     char type;       /* type of the field */
  56.     char str[80];    /* str to hold field */
  57.     char *msg;       /*message assorciated*/
  58.  
  59. };
  60.  
  61. /* type field of dialog */
  62. #define BUTTON -1
  63. #define RADIO  -2
  64.  
  65. struct DIALOG_S {
  66.     char row;        /* display row */
  67.     char col;        /* display row */
  68.     char len;        /* len of the  field */
  69.     char type;       /* type of the field */
  70.     char radio;      /* store radio status*/
  71.     char str[80];    /* str to hold field */
  72.     char *msg;       /*message assorciated*/
  73. };
  74.  
  75. typedef unsigned char uchar;
  76.  
  77. int NJ_init(char *homedir);
  78. int NJ_AutoSave(int(*asfun)());
  79. int NJ_getvideo(struct NJVIDEO *v);
  80. int NJ_end();
  81.  
  82. int NJ_ChineseInput(int Ok);
  83. int NJ_setlxonoff(int on);
  84. int NJ_setinput(int method, int select);
  85.  
  86.  
  87. int NJ_getkey()                                                            ;
  88. int NJ_getmouse(int *row, int *col)                                        ;
  89. int NJ_setinput(int m, int c)                                              ;
  90. int NJ_gets0(uchar *str, int row, int col, int len, int Fcolor, int Bcolor);
  91. int NJ_gets(uchar *str, int row, int col, int len, int Fcolor, int Bcolor) ;
  92. int NJ_puts(uchar *str, int row, int col, int Fcolor, int Bcolor)          ;
  93. int NJ_putc(uchar c, int row, int col, int Fcolor, int Bcolor)             ;
  94. int NJ_window(int r1, int c1, int r2, int c2, int color)                   ;
  95. int NJ_fillwin(int r1, int c1, int r2, int c2, int color)                  ;
  96. int NJ_clscolum(int row1, int col1, int col2, int color)                   ;
  97. int NJ_clsrows(int row1, int row2, int color)                              ;
  98. int NJ_cursorOnOff(int on)                                                 ;
  99. int NJ_setcursor(int row, int col)                                         ;
  100. int NJ_mousecursor(int on)                                                 ;
  101. int NJ_line(int row1, int col1, int row2, int col2, int color);
  102. int NJ_box(int row1, int col1, int row2, int col2, int color) ;
  103.  
  104. int NJ_entry(int Fcolor1, int Bcolor1, int Fcolor2,int Bcolor2,
  105.              struct ENTRY_S *sl,int ns,int ini,int(*msgfun)(char *))       ;
  106. int NJ_menu(int Fcolor1, int Bcolor1, int Fcolor2,int Bcolor2, int pressed,
  107.              struct MENU_S *sl,int ns,int ini,int(*msgfun)(char *))        ;
  108. int NJ_button(struct MENU_S *sl,int ns,int ini,int pressed);
  109. int NJ_dialog(int Fcol1,int Bcol1,int Fcol2,int Bcol2,int Fcol3,int Bcol3,
  110.              struct DIALOG_S *sl,int ns,int ini,
  111.              int(*mdialog)(int, int), int(*msgfun)(char *));
  112. /*---------------------------------------------------------------------------*/
  113.